import request from '@/utils/request'

// 获取分销订单关联列表时，将分销状态为'1'（待结算）的优先级设为最高，排在最前面
export function listOrderRelationSummary(query) {
  return request({
    url: '/ruoyi/relationOrder/selectOrderRelationSummaryList',
    method: 'get',
    params: query
  })
}

// 查询分销订单关联列表
export function listRelationOrder(query) {
  return request({
    url: '/ruoyi/relationOrder/list',
    method: 'get',
    params: query
  })
}

// 查询分销订单关联详细
export function getRelationOrder(relationId) {
  return request({
    url: '/ruoyi/relationOrder/' + relationId,
    method: 'get'
  })
}

// 新增分销订单关联
export function addRelationOrder(data) {
  return request({
    url: '/ruoyi/relationOrder',
    method: 'post',
    data: data
  })
}

// 修改分销订单关联
export function updateRelationOrder(data) {
  return request({
    url: '/ruoyi/relationOrder',
    method: 'put',
    data: data
  })
}

// 删除分销订单关联
export function delRelationOrder(relationId) {
  return request({
    url: '/ruoyi/relationOrder/' + relationId,
    method: 'delete'
  })
}
